Communication apparatus, method for controlling the same, and computer-readable recording medium

ABSTRACT

Information on one or more networks in which a communication apparatus has participated before and information on one or more external apparatuses to which the communication apparatus has been connected before are held. Information on a first network previously formed by the communication device and information on a second network previously formed by an external access point are held such that the information on the first network and the information on the second network are identifiable. If it is judged that there is not a network corresponding to the held information on the second network, it is determined to use a network based on the held information on the first network.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to a process of connecting a communicationapparatus to a network.

2. Description of the Related Art

In a typical image capturing apparatus including a wirelesscommunication apparatus mounted therein, such as a digital camera,captured image data is recorded as a file on a recording medium, such asa memory card, included in or loaded to the camera. The image data is inthe form of a file, and thus can be easily transmitted and receivedthrough communication.

There is known a method for displaying the names of wirelesscommunication apparatuses stored in advance on a display unit in aselectable manner, and displaying information indicating whether or notthe wireless communication apparatuses exist in a network on the displayunit, in order to easily establish a connection to a desiredcommunication partner. Also, a technique for reestablishing a connectionto a desired apparatus using a connection history is available.

Further, there is a wireless communication apparatus having a simplifiedaccess point function. When the wireless communication apparatus startsthe simplified access point function, another apparatus detects thewireless communication apparatus as an access point and participates ina network formed by the wireless communication apparatus. In this way,even in an environment where there is no wireless networks formed byaccess points, a connection between wireless communication apparatusescan be established.

SUMMARY OF THE INVENTION

The present invention provides a communication apparatus that is to beconnected to an external apparatus via a network. The communicationapparatus includes a participation unit configured to participate in anetwork formed by an external access point; a forming unit configured toform a network, with the communication apparatus as an access point; aholding unit configured to hold information on one or more networks inwhich the communication apparatus has participated before, informationon one or more external apparatuses to which the communication apparatushas been connected before, information on a first network previouslyformed by the forming unit, and information on a second networkpreviously formed by the external access point such that the informationon the first network and the information on the second network areidentifiable; an accepting unit configured to accept selection, on thebasis of the information on the one or more external apparatuses held bythe holding unit, of an external apparatus for which communication via anetwork is to be established; a judging unit configured to judge, in acase where selection is accepted by the accepting unit, whether or not anetwork corresponding to the information on the second network held bythe holding unit exists; and a determining unit configured to, in a casewhere the judging unit judges that the network does not exist, determineto use a network based on the information on the first network held bythe holding unit.

Further features of the present invention will become apparent from thefollowing description of exemplary embodiments with reference to theattached drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a block diagram illustrating the configuration of acommunication apparatus according to a first embodiment of the presentinvention.

FIG. 2 is a block diagram illustrating the configuration of a mobilephone according to the first embodiment.

FIGS. 3A and 3B are diagrams illustrating network configurationsaccording to the first embodiment.

FIG. 4 is a conceptual diagram of a database held by the communicationapparatus according to the first embodiment.

FIG. 5A is a flowchart illustrating a process performed by thecommunication apparatus according to the first embodiment.

FIG. 5B is a flowchart illustrating a process performed by thecommunication apparatus according to the first embodiment.

FIG. 5C is a flowchart illustrating a process performed by thecommunication apparatus according to the first embodiment.

FIGS. 6A to 6J are diagrams illustrating an example of screens that aredisplayed during processing of the communication apparatus according tothe first embodiment.

FIG. 7A is a flowchart illustrating a process performed by thecommunication apparatus according to the first embodiment.

FIG. 7B is a flowchart illustrating a process performed by thecommunication apparatus according to the first embodiment.

FIG. 7C is a flowchart illustrating a process performed by thecommunication apparatus according to the first embodiment.

DESCRIPTION OF THE EMBODIMENTS

Hereinafter, embodiments of the present invention will be described inwhich a communication apparatus is mounted in an image capturingapparatus, such as a digital camera. The present invention is notlimited thereto, and may be applied to an information processingapparatus such as a mobile phone, a portable medium player, a so-calledtablet device, and a personal computer.

First Embodiment Configuration of Image Capturing Apparatus

An overview of the configuration and function of an image capturingapparatus according to a first embodiment of the present invention willbe described with reference to FIG. 1.

Referring to FIG. 1, a control unit 101 controls the individual units ofa digital camera 100 in accordance with a signal input thereto and aprogram described below. The control unit 101 does not necessarilycontrol the entire apparatus, and a plurality of hardware units mayshare processing to control the entire apparatus.

An image capturing unit 102 converts light of a subject formed by a lensincluded in the image capturing unit 102 to an electric signal, performsa noise reduction process and so forth, and outputs digital data asimage data. The captured image data is stored in a buffer memory,undergoes certain computation in the control unit 101, and is recordedon a recording medium 110.

A nonvolatile memory 103 is an electrically erasable and recordablenonvolatile memory. A program executed by the control unit 101 anddescribed below is stored therein.

A working memory 104 is used as a buffer memory that temporarily storesimage data captured by the image capturing unit 102, an image displaymemory for a display unit 106, a working area for the control unit 101,and so forth.

An operation unit 105 is used for accepting an instruction for thedigital camera 100 from a user. The operation unit 105 includes, forexample, operation members such as a power button for providing, from auser, an instruction to turn ON/OFF the power of the digital camera 100,a release switch for providing an instruction to perform shooting, and aplayback button for providing an instruction to play back image data.Also, a touch panel included in a display unit 106, which will bedescribed below, is included in the operation unit 105. The releaseswitch includes a switch SW1 and a switch SW2. When the release switchis in a so-called half-pressed state, the switch SW1 is in an ON-state.In this state, instructions for performing preparation for shooting,such as an auto focus (AF) process, an auto exposure (AE) process, anauto white balance (AWB) process, and a flash preliminary emission (EF)process, are accepted. When the release switch is in a so-calledfully-pressed state, the switch SW2 is in an ON-state. In this state, aninstruction to perform shooting is accepted.

The display unit 106 displays a viewfinder image during shooting,displays captured image data, and displays characters for an interactiveoperation screen. The display unit 106 is not necessarily included inthe digital camera 100. The digital camera 100 may be connected to thedisplay unit 106 that may be provided inside or outside the digitalcamera 100, and may have at least a display control function forcontrolling display on the display unit 106.

The recording medium 110 is capable of storing image data output fromthe image capturing unit 102. The recording medium 110 may be configuredso as to be removable from the digital camera 100, or may be built inthe digital camera 100. That is, the digital camera 100 may have atleast a unit for accessing the recording medium 110.

A connection unit 111 is an interface that is used for establishing aconnection to an external apparatus. The digital camera 100 according tothis embodiment is capable of transmitting data to and receiving datafrom an external apparatus via the connection unit 111. In thisembodiment, the connection unit 111 includes an interface that is usedfor communicating with an external apparatus via a wireless local areanetwork (LAN). The control unit 101 implements wireless communicationwith an external apparatus by controlling the connection unit 111. Thecommunication scheme used here is not limited to the wireless LAN.

The digital camera 100 according to this embodiment is capable ofoperating as a slave apparatus in an infrastructure mode of a wirelessLAN. In the case of operating as a slave apparatus, the digital camera100 is capable of participating in a network formed by an access point(hereinafter referred to as an AP) in the surrounding area byestablishing a connection to the AP. The digital camera 100 according tothis embodiment is a kind of AP, and is also capable of operating as asimplified AP having a more limited function. An AP according to thisembodiment is an example of a relay apparatus. If the digital camera 100operates as a simplified AP, the digital camera 100 forms a network byitself. An apparatus around the digital camera 100 recognizes thedigital camera 100 as an AP, and becomes capable of participating in thenetwork formed by the digital camera 100. A program that causes thedigital camera 100 to operate in the above-described manner is stored inthe nonvolatile memory 103.

Although the digital camera 100 according to this embodiment is a kindof AP, the digital camera 100 is a simplified AP that does not have agateway function for transferring data received from a slave apparatusto an Internet provider or the like. Thus, even if the digital camera100 receives data from another apparatus that participates in thenetwork formed by the digital camera 100, the digital camera 100 isincapable of transferring the data to a network such as the Internet.According to another embodiment, the digital camera 100 may have agateway function.

Configuration of Mobile Phone

The configuration and function of a mobile phone 200 according to thefirst embodiment of the present invention will be described withreference to FIG. 2. An apparatus to be connected according to anembodiment of the present invention is applied to the mobile phone 200.Hereinafter, a mobile phone will be described as an example of thecommunication apparatus according to an embodiment of the presentinvention, but the communication apparatus is not limited thereto. Thepresent invention is also applicable to an information processingapparatus, such as a digital camera having a wireless function, aportable medium player, a so-called tablet device, a personal computer,and a smart phone.

Referring to FIG. 2, a control unit 201 controls the individual units ofthe mobile phone 200 in accordance with a signal input thereto and aprogram described below. The control unit 201 does not necessarilycontrol the entire apparatus, and a plurality of hardware units mayshare processing to control the entire apparatus.

An image capturing unit 202 converts light of a subject formed by a lensincluded in the image capturing unit 202 to an electric signal, performsa noise reduction process and so forth, and outputs digital data asimage data. The captured image data is stored in a buffer memory,undergoes certain computation in the control unit 201, and is recordedon a recording medium 210.

A nonvolatile memory 203 is an electrically erasable and recordablenonvolatile memory. Various programs or the like executed by the controlunit 201 are stored therein. A program for communicating with thedigital camera 100 is also held in the nonvolatile memory 203, and isinstalled as a camera communication application. The processingperformed by the mobile phone 200 according to this embodiment isimplemented by reading a program provided by the camera communicationapplication. The camera communication application includes a program forutilizing a basic function of an operating system (OS) installed in themobile phone 200. The OS of the mobile phone 200 may have a program forimplementing the processing according to this embodiment.

A working memory 204 is used as a buffer memory that temporarily storesimage data generated by the image capturing unit 202, an image displaymemory for a display unit 206, a working area for the control unit 201,and so forth.

An operation unit 205 is used for accepting an instruction for themobile phone 200 from a user. The operation unit 205 includes, forexample, operation members such as a power button for providing, from auser, an instruction to turn ON/OFF the power of the mobile phone 200,and a touch panel included in the display unit 206.

The display unit 206 displays image data, and displays characters for aninteractive operation. The mobile phone 200 does not necessarily includethe display unit 206. The mobile phone 200 may be capable of connectingto the display unit 206 and have at least a display control function forcontrolling display on the display unit 206.

The recording medium 210 is capable of storing image data output fromthe image capturing unit 202. The recording medium 210 may be configuredso as to be removable from the mobile phone 200, or may be built in themobile phone 200. That is, the mobile phone 200 may have at least a unitfor accessing the recording medium 210.

A connection unit 211 is an interface that is used for establishing aconnection to an external apparatus. The mobile phone 200 according tothis embodiment is capable of transmitting data to and receiving datafrom an external apparatus via the connection unit 211. In thisembodiment, the connection unit 211 includes an interface that is usedfor communicating with an external apparatus via a wireless LAN. Thecontrol unit 201 implements wireless communication with an externalapparatus by controlling the connection unit 211. The mobile phone 200according to this embodiment is at least capable of operating as a slaveapparatus in an infrastructure mode, and participating in a networkformed by an AP in the surrounding area.

A public network connection unit 212 is an interface that is used forperforming public wireless communication. The mobile phone 200 iscapable of performing voice communication and data communication withanother apparatus via the public network connection unit 212. In thecase of voice communication, the control unit 201 inputs and outputsvoice signals via a microphone 213 and a speaker 214. In thisembodiment, the public network connection unit 212 includes an interfacefor performing communication using a 3rd generation communicationscheme. Instead of the 3rd generation communication scheme, anothercommunication scheme, such as long term evolution (LTE), worldwideinteroperability for microwave access (WiMAX), asymmetric digitalsubscriber line (ADSL), fiber to the home (FTTH), and a so-called 4thgeneration communication scheme, may be used. Further, the connectionunit 211 and the public network connection unit 212 are not necessarilyconstituted by independent hardware units, and may be integrated into asingle antenna.

System Configuration

A system configuration in which the digital camera 100 and the mobilephone 200 according to this embodiment are connected to each other willbe described with reference to FIGS. 3A and 3B.

In a case where the digital camera 100 and the mobile phone 200 transmitand receive data via a wireless LAN, the following two datacommunication modes illustrated in FIGS. 3A and 3B are available.

FIG. 3A illustrates a first data communication mode in which the digitalcamera 100 and the mobile phone 200 participate in a wireless LANnetwork formed by an external AP 300, which is an example of an externalrelay apparatus. The digital camera 100 and the mobile phone 200 detecta beacon signal that is regularly transmitted by the external AP 300,and participate in the wireless LAN network formed by the external AP300. After participating in the same wireless LAN network, the digitalcamera 100 and the mobile phone 200 find each other, acquire informationon the ability of each other, and become capable of transmitting andreceiving data via the wireless LAN (a connection between theapparatuses is established).

The external AP 300 according to this embodiment is capable ofconnecting to an external network, such as the Internet, by using apublic network or the like. Thus, the mobile phone 200 is capable oftransmitting data to the Internet via the external AP 300.

FIG. 3B illustrates a second data communication mode in which thedigital camera 100 and the mobile phone 200 are directly connected toeach other without via the external AP 300. In this case, the digitalcamera 100 operates as a simplified AP and forms a wireless LAN network.Operating as a simplified AP, the digital camera 100 starts regularlytransmitting a beacon signal. The mobile phone 200 detects the beaconsignal, and participates in the wireless LAN network formed by thedigital camera 100. As in the case illustrated in FIG. 3A, the digitalcamera 100 and the mobile phone 200 find each other, acquire informationon the ability of each other to establish a connection, and becomecapable of transmitting and receiving data.

As described above, the digital camera 100 according to this embodimentdoes not have a function of communicating with an external network, suchas the Internet. Thus, the mobile phone 200 that participates in thewireless LAN network formed by the digital camera 100 is incapable oftransmitting data to the Internet or the like via the simplified AP.

As described above, the digital camera 100 and the mobile phone 200communicate in the two data communication modes. In this embodiment, adescription will be given of an example in which appropriate control isperformed in accordance with these data communication modes.

Data Structure of Connection History

A database held by the digital camera 100 according to this embodimentwill be described with reference to FIG. 4.

In a case where the digital camera 100 establishes a connection with apartner apparatus, the digital camera 100 first participates in anetwork (here, a case where the digital camera 100 serves as asimplified AP and forms a network is included), and then establishes aconnection with the partner apparatus. In this embodiment, informationon a network and information on a partner apparatus are managed usingseparate databases. A database held by the digital camera 100 accordingto this embodiment includes a connected apparatus information section410, a network participation parameter section 420, and a networkformation parameter section 430.

The connected apparatus information section 410 stores information formanaging partner apparatuses for which the digital camera 100 hasestablished a connection before via a network. The information stored inthe connected apparatus information section 410 is an example of historyinformation stored in a first storage unit. The connected apparatusinformation section 410 stores “connected apparatus information number”,“connection order”, “type of apparatus”, “registration name”, “UUID”,“view permission setting”, and “network formation parameter number”,which are given to each piece of connected apparatus information. Here,“connection order” represents the order in which the digital camera 100established a connection to apparatuses represented by the informationstored in the connected apparatus information section 410 in the past. Alarger number represents an apparatus that has been connected morerecently. “Registration name” is the name of a connected apparatus thatcan be set by a user, and can be freely changed so that the user iscapable of identifying the connected apparatus. “Type of apparatus”,“registration name”, and “UUID” are not necessarily separate pieces ofinformation. For example, these pieces of information may be specifiedusing a single ID in which a type, a name, and a unique character stringare combined. “Network formation parameter number” represents whichparameter in the network formation parameter section 430 was used toform a network. N pieces of connected apparatus information may bestored in the connected apparatus information section 410. To store moreinformation, it is necessary to delete one or more pieces of connectedapparatus information that are already stored. A piece of connectedapparatus information may be deleted in response to an operationperformed by the user of the digital camera 100. When more informationis to be stored in a state where N pieces of information are alreadystored, the piece of connected apparatus information having the smallestvalue may be deleted by referring to “connection order”.

The network participation parameter section 420 stores information formanaging networks in which the digital camera 100 has participatedbefore and which have been formed by external APs or the like. Theinformation stored in the network participation parameter section 420 isan example of history information stored in a second storage unit. Thenetwork participation parameter section 420 stores “networkparticipation parameter number”, “connection order”, “ESSID”,“authentication scheme”, “type of code”, “encryption key”, “channel”,“IP address acquisition method”, and “DNS acquisition method”, which aregiven to each network participation parameter. Here, “connection order”represents the order in which the digital camera 100 participated inwireless networks represented by the information stored in the networkparticipation parameter section 420 in the past. A larger numberrepresents a network in which the digital camera 100 has participatedmore recently. M parameters may be stored in the network participationparameter section 420. To store more parameters, it is necessary todelete one or more parameters that are already stored in the networkparticipation parameter section 420. A parameter in the networkparticipation parameter section 420 may be deleted in response to anoperation performed by the user of the digital camera 100.Alternatively, when a parameter is to be newly stored in a state where Mparameters are already stored, the parameter having the smallest numbermay be deleted by referring to “connection order”. In a case where thedigital camera 100 forms a network while serving as a simplified AP, theinformation thereon is managed in the network formation parametersection 430 described below, as information distinguishable from theinformation in the network participation parameter section 420.

The network formation parameter section 430 manages information onnetworks formed by the digital camera 100 serving as a simplified AP.The network formation parameter section 430 stores “network formationparameter number”, “ESSID”, and “encryption key”, which are given toeach network formation parameter. The network formation parametersection 430 may store information on an authentication scheme, a type ofcode, a channel, an IP address acquisition method, a DNS acquisitionmethod, and so forth, but an item common to all the networks formed bythe digital camera 100 is not necessarily stored. The network formationparameter section 430 is capable of storing N parameters, the number ofwhich is the same as the number of pieces of information stored in theconnected apparatus information section 410. In a case where a piece ofinformation in the connected apparatus information section 410 isdeleted, the parameter associated therewith in the network formationparameter section 430 is deleted, so that more than N parameters are notstored in the network formation parameter section 430.

The database held by the digital camera 100 may be used by being movedby the control unit 101 from the nonvolatile memory 103 to the workingmemory 104. The following description will be given under the assumptionthat the database held by the digital camera 100 is in the workingmemory 104.

Apparatus Registration Process

With reference to FIGS. 5A to 5C, a description will be given of aprocess performed by the digital camera 100 according to this embodimentin a case where the digital camera 100 communicates with a communicationapparatus including the mobile phone 200 for the first time. The processdescribed below is implemented by the control unit 101 of the digitalcamera 100 that controls the individual units of the digital camera 100in accordance with an input signal and a program. Unless otherwisespecified, this is the same in the other flowcharts illustratingprocesses performed by the digital camera 100. This process starts whenthe user of the digital camera 100 provides an instruction to establisha connection with another apparatus by operating a menu or the like.

FIG. 6A illustrates an example of a user interface (UI) screen that isdisplayed on the display unit 106 when a process of establishing aconnection to an apparatus is started. The user of the digital camera100 selects, as a type of apparatus to be connected, a “camera” button601, a “mobile phone” button 602, a “PC” button 603, a “printer” button604, a “web service” button 605, or the like. If a “menu” button 606 isselected, the screen returns to the preceding screen. In thisembodiment, a description will be given of a case where the “mobilephone” button 602 is selected.

FIG. 6B illustrates an example of a UI screen that is displayed on thedisplay unit 106 after the type of apparatus to be connected has beenselected by the user of the digital camera 100, at the time of selectingan apparatus registration process or a second or more connectionprocess. The user of the digital camera 100 selects a “registerapparatus to be connected” button 607 to register the apparatus of thetype, or selects a button 608 or 609 representing an already registeredapparatus to perform a process of establishing a connection with theapparatus for a second or later time.

With reference to FIG. 5A, a description will be given of an apparatusregistration process (participation in/formation of a network) that isperformed by the digital camera 100 in a case where “register apparatusto be connected” is selected.

Referring to FIG. 5A, in step S501, the control unit 101 judges whetheror not a parameter is stored in the network participation parametersection 420. If the control unit 101 judges that a parameter is storedin the network participation parameter section 420, the process proceedsto step S502, and the control unit 101 searches for an AP to participatein a wireless network. If the control unit 101 judges that a parameteris not stored in the network participation parameter section 420, theprocess proceeds to step S504, and the control unit 101 performs awireless network formation process.

In step S502, the control unit 101 controls the connection unit 111, andthereby searches for an AP existing in the surrounding area. FIG. 6Cillustrates an example of a screen that is displayed on the display unit106 while an AP is being searched for.

In step S503, the control unit 101 judges whether or not an AP whoseparameter is stored in the network participation parameter section 420,that is, a registered AP, is found in the AP searching in step S502. Ifthe control unit 101 judges that an AP is found, the process proceeds tostep S506. If the control unit 101 judges that an AP is not found, theprocess proceeds to step S504, and the control unit 101 performs awireless network formation process by using a simplified AP of the ownapparatus. In this embodiment, it is judged through comparison of ESSIDswhether or not an AP whose parameter is stored in the networkparticipation parameter section 420 is found in the AP searching in stepS502. Alternatively, the judgment may be performed by using otheridentifiers, such as BSSIDs.

If the control unit 101 judges in step S501 that a parameter is notstored in the network participation parameter section 420, the processproceeds to step S504 because a registered AP will not be found in stepS503 even if AP searching is performed in step S502. Thus, the searchingin step S502 is omitted to shorten the time period until a connection isestablished. Further, in a case where a parameter is not stored in thenetwork participation parameter section 420, it is necessary to select anetwork and input a parameter to participate in the network, and theoperation of the digital camera 100 is complicated. Thus, networkformation using a simplified AP, in which the number of operations ofinputting parameters is smaller, is preferentially performed.

In step S504, the control unit 101 generates an ESSID, an authenticationscheme, a type of code, an encryption key, and a channel that arenecessary to form a wireless LAN network. In the case of a newregistration process, at least one of an ESSID, an encryption key, anauthentication scheme, a type of code, and a channel that are generatedby the digital camera 100 according to this embodiment varies each time.In this embodiment, the control unit 101 does not register generatednetwork information in the network formation parameter section 430 instep S504. Registration in the network formation parameter section 430is performed at the time when a connection to an apparatus isestablished (described below).

In step S505, the control unit 101 forms a wireless LAN network by usingthe network parameter generated in step S504. Also, the control unit 101displays at least an ESSID and an encryption key, which are informationnecessary for an external apparatus to participate in the network, onthe display unit 106. FIG. 6D illustrates an example of a screen that isdisplayed on the display unit 106 in a connection waiting state. On thescreen illustrated in FIG. 6D, an ESSID has been set to “CAMERA-123” andan encryption key has been set to “12345678” as indicated by a dialog610. The user of an external apparatus is capable of easilyparticipating in the network formed by the digital camera 100 by seeingthe display. Further, in step S505, an IP address is assigned and asubnet is set to enable communication with another apparatus, and theprocess proceeds to step S521.

Next, a description will be given of a case where the process proceedsfrom step S503 to step S506. In step S506, the control unit 101 judgeswhether or not a plurality of APs whose parameters are stored in thenetwork participation parameter section 420 are found in the APsearching in step S502. If the control unit 101 judges that a pluralityof APs are found, the process proceeds to step S508. If the control unit101 judges that a plurality of APs are not found, the process proceedsto step S507.

In step S507, the control unit 101 selects, from among the APs found inthe AP searching in step S502, an AP whose parameter is stored in thenetwork participation parameter section 420, and the process proceeds tostep S509.

In step S508, the control unit 101 selects, from among the APs found inthe AP searching in step S502, an AP whose parameter is stored in thenetwork participation parameter section 420 and which corresponds to anetwork in which the digital camera 100 has participated recently, andthe process proceeds to step S509. The control unit 101 refers to the“connection order” information in the network participation parametersection 420 and selects the largest value, thereby being capable ofselecting the AP corresponding to the network in which the digitalcamera 100 has participated most recently. For example, it is assumedthat three APs, NETWORK-100, NETWORK-101, and NETWORK-102 are found inthe AP searching in step S502 in a state where the informationillustrated in FIG. 4 is stored in the network participation parametersection 420. In this case, the APs whose parameters are stored in thenetwork participation parameter section 420 are NETWORK-100 stored in acolumn 421 and NETWORK-101 stored in a column 422. The “connectionorder” corresponding thereto in the network participation parametersection 420 is “6” for NETWORK-100 and is “2” for NETWORK-101. Thus,NETWORK-100 (in the column 421) having the larger value is selected asthe AP corresponding to the network in which the digital camera 100 hasparticipated most recently.

In step S509, the control unit 101 refers to the network participationparameter section 420, and participates in the wireless LAN networkcorresponding to the AP selected in step S507 or step S508. FIG. 6Eillustrates an example of a screen that is displayed on the display unit106 during a wireless LAN network participation process.

In step S510, the control unit 101 judges whether or not a connection tothe wireless LAN network has been successfully established. If thecontrol unit 101 judges that a connection has been successfullyestablished, the process proceeds to step S511. If the control unit 101judges that establishment of a connection has failed, the processproceeds to step S513, and the control unit 101 displays an errormessage.

In step S511, the control unit 101 assigns an IP address and sets asubnet by referring to the information on the IP address acquisitionmethod and the DNS acquisition method in the network participationparameter section 420, and the process proceeds to step S512.

In step S512, the control unit 101 judges whether or not the IP addresshas been successfully assigned. If the control unit 101 judges that theIP address has been successfully assigned, the process proceeds to stepS521, and the control unit 101 performs an apparatus search process. Ifthe control unit 101 judges that assignment of the IP address hasfailed, the process proceeds to step S513, and the control unit 101displays an error message.

In step S513, the control unit 101 displays, on the display unit 106, amessage indicating that establishment of a connection to the wirelessLAN network has failed, or a message indicating that assignment of theIP address has failed. If the control unit 101 receives, from the userof the digital camera 100, a notification indicating that the errormessage has been read, the process proceeds to step S541. This is theprocess performed by the digital camera 100 to participate in a network.

With reference to FIG. 5B, a description will be given of an apparatusregistration process (a process of establishing a connection to anapparatus) performed by the digital camera 100 will be described.

Referring to FIG. 5B, in step S521, the control unit 101 searches for aconnectable apparatus in the same network. The control unit 101 performssearching by using the simple service discovery protocol (SSDP), themulticast domain name service (mDNS), or the like, and detects a servicereported by the mobile phone 200. In this embodiment, a user on themobile phone 200 side also performs a certain operation here, so that astate occurs in which the mobile phone 200 can be searched for by thedigital camera 100. In this embodiment, a certain communicationapplication is started, so that a state occurs in which the mobile phone200 can be searched for by the digital camera 100. FIGS. 6D and 6Fillustrate an example of screens that are displayed on the display unit106 while an apparatus is being searched for. FIG. 6D illustrates anexample of a screen in a case where a wireless LAN network is formed byusing the simplified AP function of the digital camera 100. The controlunit 101 displays, on the display unit 106, the SSID and encryption keyof the formed wireless network, and a message that prompts the user tostart the application of the mobile phone 200, as shown in an area 610.FIG. 6F illustrates an example of a screen in a case where the digitalcamera 100 has participated in a wireless LAN network formed by anexternal AP. This screen is displayed as a result of shift from thescreen illustrated in FIG. 6E. The control unit 101 displays, on thedisplay unit 106, a message that prompts the user to start theapplication of the mobile phone 200. Accordingly, when the user startsthe application of the mobile phone 200, the mobile phone 200 transmitsa service notification to the connected network. Thus, the digitalcamera 100 becomes capable of searching for the mobile phone 200.

In step S522, the control unit 101 judges whether or not a connectableapparatus has been found. If the control unit 101 judges that aconnectable apparatus has been found, the process proceeds to step S524,and the control unit 101 displays a list of one or more apparatuses thathave been found. If the control unit 101 judges that a connectableapparatus has not been found, the process proceeds to step S523.

In step S523, the control unit 101 judges whether or not an instructionto change the wireless network has been received from the user of thedigital camera 100. If the control unit 101 judges that an instructionto change the wireless network has been received, the control unit 101erases the wireless LAN network that currently exists or withdraws fromthe current network, and the process proceeds to step S541. If thecontrol unit 101 judges that an instruction to change the wirelessnetwork has not been received, the process proceeds to step S521. Forexample, in FIG. 6D, which illustrates an example of a screen in a casewhere a wireless LAN network is formed, if a “change network” button 612is selected, the control unit 101 judges that an instruction to changethe wireless network has been received, and erases the current wirelessLAN network, and the process proceeds to step S541. In FIG. 6F, whichillustrates an example of a screen in a case where the digital camera100 participates in the wireless LAN network, if a “change network”button 614 is selected, the control unit 101 judges that an instructionto change the wireless network has been received, and withdraws from thecurrent wireless LAN network, and the process proceeds to step S541.Also, if a “change network” button 613 in FIG. 6E, which illustrates anexample of a screen that is displayed during a wireless LAN networkparticipation process, is selected, the control unit 101 suspends thewireless LAN network participation process, and the process proceeds tostep S541.

In step S524, the control unit 101 displays a list of one or moreapparatuses included in the service notification on the display unit106. FIG. 6G illustrates an example of a screen that is displayed on thedisplay unit 106 and that shows a list of a connectable apparatus. InFIG. 6G, “mobilePhone1” is detected as a connectable apparatus. Also, inthis step, a UUID and an apparatus name included in the servicenotification are stored in the working memory 104 in association witheach other.

In this embodiment, an apparatus name and a UUID are included in aservice notification. Alternatively, the digital camera 100 that hasreceived a service notification may inquire of the mobile phone 200about an apparatus name and a UUID. In a case where information on theapparatus to be connected having a UUID included in the servicenotification is already stored in the connected apparatus informationsection 410, the registration name stored in the connected apparatusinformation section 410 may be displayed instead of the apparatus nameincluded in the service notification displayed on the display unit 106.

In step S525, the control unit 101 allows the user of the digital camera100 to select any one of the apparatus names displayed in a list in stepS524. In FIG. 6G, which illustrates an example of a screen displayed instep S524, a connectable apparatus button 615 can be selected. Also, inthis step, searching for an apparatus to be connected is continued. If aconnectable apparatus is newly detected, the control unit 101 displaysan apparatus name included in a service notification on the display unit106 in the form of a list.

In step S526, the control unit 101 transmits a connection request to themobile phone 200 by using the UUID of the apparatus selected in stepS525, and starts a process for establishing a connection to the selectedapparatus, and the process proceeds to step S527. In this embodiment, aconnection is established by using the UUID of the apparatus to beconnected, but a connection may be established by specifying an IPaddress or a port number on the basis of the UUID. An IP address may beacquired at the time of performing searching. FIG. 6H illustrates anexample of a screen showing an apparatus to be connected and displayedon the display unit 106. On the screen illustrated in FIG. 6H, aconnection request is transmitted to “mobilePhone1”.

In step S527, the control unit 101 judges whether or not a connection tothe selected apparatus has been successfully established. If the controlunit 101 judges that a connection has been successfully established, theprocess proceeds to step S528. If the control unit 101 judges thatestablishment of a connection has failed, the control unit 101 displaysan error message on the display unit 106, and ends the apparatusregistration process. FIG. 6I illustrates an example of a screen that isdisplayed on the display unit 106 when a connection is established. Onthe screen illustrated in FIG. 6I, a disconnection button 616, aresizing selection button 617, an image transmission button 618, and soforth are displayed. If the disconnection button 616 is selected, aconnection to a connected apparatus is disconnected. If the resizingselection button 617 is selected, the setting of resizing can bechanged, for example, to “no resizing”, “M size”, or “S size”. If theimage transmission button 618 is selected, resizing to the selected sizeis performed, and an image is transmitted to the connected apparatus.

In step S528, the control unit 101 judges whether or not the wirelessLAN network that is currently connected is a network formed by thedigital camera 100 by using the own simplified AP function. If thecontrol unit 101 judges that the wireless LAN network is a networkformed by the digital camera 100, the process proceeds to step S529.

If the control unit 101 judges that the wireless LAN network is not anetwork formed by the digital camera 100, the process proceeds to stepS530.

In step S529, the control unit 101 stores the parameter of the networkformed by the digital camera 100 in the network formation parametersection 430. For example, in a state where nothing is stored in thenetwork formation parameter section 430, in a case where the ESSID ofthe network formed by the digital camera 100 is “CAMERA-123” and theencryption key is “12345678”, the network formation parameter in acolumn 431 in FIG. 4 is obtained.

The intention of storing a network parameter only in a case where it isjudged that the current wireless LAN network is a network formed by thedigital camera 100 is as follows. That is, network formation parametersare stored in association with apparatuses to be connected in aone-to-one relationship, and are thus available in a process ofestablishing a connection for a second or later time. Thus, a parameteris not stored upon formation of a network, but the parameter is storedafter a connected apparatus to be associated with is determined. Anetwork parameter is not stored in a case where it is judged that thecurrent wireless LAN network is not a network formed by the digitalcamera 100, because the network parameter is stored during a networkchange process, which will be described below.

In step S530, the control unit 101 stores information on the connectedapparatus in the connected apparatus information section 410. Forexample, in a state where information numbers 2 and 3 of connectedapparatus information are already registered, in a case where theapparatus for which a connection has been established is “mobilePhone1”,connected apparatus information in the column 411 of the connectionapparatus information number 1 illustrated in FIG. 4 is obtained. Atthis time, it is necessary that the connected apparatus informationnumber is different from the connected apparatus information numbersthat are already stored. Also, it is necessary to set connection orderso that the connection order has a value larger than that of the alreadystored connected apparatus information. The UUID stored in the workingmemory 104 in step S524 may be stored, or a UUID may be inquired of themobile phone 200. A view permission may be selected by the user of thedigital camera 100 and may be stored. Alternatively, informationrepresenting “permitted” or “not permitted” may be stored as default,and changes may be made later. If the control unit 101 judges in stepS528 that the wireless LAN network is a network formed by the digitalcamera 100, the control unit 101 stores the network formation parameternumber stored in step S529. If the control unit 101 judges in step S528that the wireless LAN network is not a network formed by the digitalcamera 100, nothing is stored.

With reference to FIG. 5C, a description will be given of an apparatusregistration process (a network change process) performed by the digitalcamera 100.

Referring to FIG. 5C, in step S541, the control unit 101 searches for anAP existing in the surrounding area, and the process proceeds to stepS542.

In step S542, the control unit 101 displays, on the display unit 106, alist of one or more ESSIDs included in a beacon signal detected throughscanning performed in step S541. FIG. 6J illustrates an example of ascreen that is displayed on the display unit 106 as result of APsearching. On the screen illustrated in FIG. 6J, ESSIDs “NETWORK-100”and “NETWORK-102” are detected. In a case where an “update” button 619is selected, the control unit 101 searches again for an AP existing inthe surrounding area, and displays a screen similar to that in FIG. 6J.In this embodiment, only two APs existing in the surrounding area aredisplayed. If three or more APs are found, the three or more APsexisting in the surrounding area may be displayed by scrolling thescreen. At this time, with reference to “connection order” in thenetwork participation parameter section 420, the APs corresponding tothe networks in which the digital camera 100 has participated before maybe sorted in order in which the digital camera 100 has participatedrecently. Alternatively, the APs may be sorted in descending order ofradio field intensity.

In step S543, the control unit 101 judges whether or not to participatein a wireless LAN network. Referring to FIG. 6J, if a button 621 or 622indicating the detected AP is selected, the control unit 101 judges toparticipate in a wireless LAN network, the process proceeds to stepS546, and the control unit 101 performs a process of participating inthe selected wireless LAN network. If a button 620 for providing aninstruction to form a wireless LAN network is selected, the control unit101 judges not to participate in a wireless LAN network, and the processproceeds to step S544.

Steps S544 and S545 are similar to steps S504 and S505, and thus thedescription thereof is omitted.

In step S546, the control unit 101 participates in the wireless LANnetwork corresponding to the AP selected in step S543, and the processproceeds to step S547. At this time, if the selected AP is an AP whoseparameter is stored in the network participation parameter section 420,the control unit 101 may participate in the wireless LAN network withoutcausing the user to input an encryption key or the like. Alternatively,an encryption key that is stored as an initial value for an input screenfor the encryption key may be input. Also, regarding an IP addressacquisition method and a DNS acquisition method, a method that is storedmay be used without causing the user to select a method, or the user ofthe digital camera 100 may be allowed to select a method again. If theselected AP is an AP whose parameter is not stored in the networkparticipation parameter section 420, the user of the digital camera 100may be allowed to input a necessary parameter. The IP addressacquisition method and the DNS acquisition method may be input by theuser of the digital camera 100 or may be set to “auto” as default.

Steps S547 to S549 are similar to steps S510 to S512, and thus thedescription thereof is omitted. If the control unit 101 judges in stepS547 that establishment of a connection to the wireless LAN network hasfailed, the process proceeds to step S553, and the control unit 101displays an error message on the display unit 106. If the control unit101 judges in step S549 that an IP address has been successfullyassigned, the process proceeds to step S550. If the control unit 101judges that assignment of an IP address has failed, the process proceedsto step S553, and the control unit 101 displays an error message on thedisplay unit 106.

In step S550, the control unit 101 refers to the network participationparameter section 420 and judges whether or not the network parameter ofthe wireless LAN network in which the digital camera 100 currentlyparticipates in has been stored. If the control unit 101 judges that thenetwork parameter has been stored, the process proceeds to step S552,and the control unit 101 updates the network parameter. If the controlunit 101 judges that the network parameter has not been stored, theprocess proceeds to step S551, and the control unit 101 newly stores anetwork parameter.

In step S551, the control unit 101 stores, in the network participationparameter section 420, the parameter of the wireless LAN network inwhich the digital camera 100 currently participates in, and the processproceeds to step S521.

For example, if the network “NETWORK-102” is selected from the list ofAPs displayed in step S542, “NETWORK-102” is stored in the field ofESSID, and proper values are stored in the fields of authenticationscheme, type of code, encryption key, channel, IP address acquisitionmethod, and DNS acquisition method in the column 423 of the networkparticipation parameter number 3. Also, it is necessary to set thelargest value for connection order, and thus “7” is stored.

In step S552, the control unit 101 updates the network participationparameter section 420 by using the parameter of the wireless LAN networkin which the digital camera 100 currently participates, and the processproceeds to step S521. For example, if the network “NETWORK-101” isselected from the list of APs displayed in step S542, it is necessary toset the largest value for connection order of the network participationparameter number 2 (422), and thus the value is updated to “7”.

Step S553 is similar to step S513, and thus the description thereof isomitted. After an error message is displayed in step S553, if anotification indicating that the error message has been read is receivedfrom the user of the digital camera 100, process proceeds to step S541.Process of establishing connection for second or later time

With reference to FIGS. 7A to 7C, a description will be given of aprocess performed by the digital camera 100 to establish a connection toan apparatus including the mobile phone 200 for a second or later time.

First, with reference to FIG. 7A, a description will be given of aprocess performed by the digital camera 100 to establish a connection(participate in/form a network) for a second or later time.

In step S701, the control unit 101 accepts selection of an apparatus tobe connected from the user of the digital camera 100. As describedabove, if any one of the apparatuses that are already registered andindicated by the buttons 608 and 609 illustrated in FIG. 6B is selected,a connection process is performed for a second or later time. Here, asthe already registered apparatuses, a list of apparatuses whoseinformation is stored in the connected apparatus information section 410is displayed. For example, in a case where the apparatus information isin the state illustrated in FIG. 4, the already registered apparatusesare “mobilePhone1” (411), “mobilephone2” (412), and “PC1” (413). Here,the “mobile phone” button 602 is selected in FIG. 6A, and thus only“mobilePhone1” (411) and “mobilePhone2” (412), which are apparatuseswhose type is mobile phone, are displayed as the already registeredapparatuses.

Steps S702 to S704 are similar to steps S501 to S503 in FIG. 5, and thuswill be briefly described.

If the control unit 101 judges in step S702 that a parameter is notstored in the network participation parameter section 420, the processproceeds to step S705. On the other hand, in step S704, the control unit101 judges whether or not the AP whose parameter is stored in thenetwork participation parameter section 420 is found through APsearching in step S703. If the control unit 101 judges that the AP isfound, the process proceeds to step S709. If the control unit 101 judgesthat the AP is not found, the process proceeds to step S705.

In step S705, the control unit 101 refers to the connected apparatusinformation section 410, and judges whether or not there is a wirelessnetwork formation history associated with the apparatus selected in stepS701. For example, in a case where the connected apparatus informationsection 410 is in the state illustrated in FIG. 4, if “mobilePhone1”(411) is selected in step S701, a network formation parameter number isassociated, and thus the process proceeds to step S706. On the otherhand, if “mobilePhone2” (412) is selected in step S701, a networkformation parameter number is not associated, and thus the processproceeds to step S707.

In step S706, the control unit 101 refers to the connected apparatusinformation section 410, and specifies the wireless network formationparameter number associated with the apparatus selected in step S701.Then, the control unit 101 refers to the network formation parametersection 430 and reads out a network formation parameter, and the processproceeds to step S708. For example, in a case where the connectedapparatus information section 410 and the network formation parametersection 430 are in the state illustrated in FIG. 4, if “mobilePhone1”(411) is selected in step S701, the network formation parameter number 1(431) is associated. Thus, the control unit 101 refers to the networkformation parameter number 1 (431) in the network formation parametersection 430, and reads out the ESSID “CAMERA-123” and the encryption key“12345678”.

Step S707 is similar to step S504 in FIG. 5A, and thus the descriptionthereof is omitted. In step S708, the control unit 101 forms a wirelessLAN network by using the network parameter read out in step S706 or thenetwork parameter generated in step S707. That is, the control unit 101performs a process of newly forming a network as a simplified AP andcausing a connection partner to participate in the network. The processperformed thereafter is similar to step S505 in FIG. 5, and thus thedescription thereof is omitted. The process proceeds to step S721. Theintention of forming a wireless LAN network by referring to the networkformation parameter section 430 if it is judged in step S705 that thereis a wireless network formation history is as follows. That is, in thecase of establishing a connection with an apparatus for a second orlater time, if the digital camera 100 forms the same network as thepreceding time, the apparatus to be connected is capable of performing aconnection process by using a network parameter stored therein, and aprocess of causing the user to input an encryption key and so forthagain can be omitted.

Steps S709 to S716 are similar to steps S506 to S513 in FIG. 5A, andthus the description thereof is omitted. If the control unit 101 judgesin step S713 that establishment of a connection to a wireless LANnetwork has failed, the process proceeds to step S716. If the controlunit 101 judges in step S715 that an IP address has been successfullyassigned, the process proceeds to step S721. If the control unit 101judges that assignment of an IP address has failed, the process proceedsto step S716. After an error message is displayed in step S716, if anotification indicating that the error message has been read is receivedfrom the user of the digital camera 100, the process proceeds to stepS731.

With reference to FIG. 7B, a description will be given of a processperformed by the digital camera 100 to establish a connection to anapparatus for a second or later time.

Referring to FIG. 7B, in step S721, the control unit 101 searches forthe apparatus selected in step S701 from among connectable apparatusesin the same network. The details of the search method are similar tothose in step S521 in FIG. 5B, and thus the description thereof isomitted. The control unit 101 refers to the connected apparatusinformation section 410, and searches for a connectable apparatus whoseUUID matches that of the apparatus selected in step S701. For example,in a case where the connected apparatus information section 410 is inthe state illustrated in FIG. 4, if “mobilePhone1” (411) is selected instep S701, a connectable apparatus whose UUID is “0000-ABCD-EFGH” issearched for. FIGS. 6D and 6F illustrate an example of screens that aredisplayed on the display unit 106 during searching for a connectableapparatus.

In step S722, the control unit 101 judges whether or not the apparatusselected in step S701 has been found from among connectable apparatuses.If the control unit 101 judges that the apparatus selected in step S701has been found, the process proceeds to step S724. If the control unit101 judges that the apparatus selected in step S701 has not been found,the process proceeds to step S723.

Step S723 is similar to step S523 in FIG. 5B, and thus the descriptionthereof is omitted. If the control unit 101 judges in step S723 that aninstruction to change the network is provided, the process proceeds tostep S731. If the control unit 101 judges that an instruction to changethe network is not provided, the process proceeds to step S721.

In step S724, the control unit 101 transmits a connection request to themobile phone 200 by using the UUID of the apparatus selected in stepS701, and starts a process for establishing a connection with theselected apparatus. The process proceeds to step S725. The details ofthe process of establishing a connection are similar to those in stepS526 in FIG. 5B, and thus the description thereof is omitted. FIG. 6Hillustrates an example of a screen that is displayed on the display unit106 in a case where “mobilePhone1” is selected in step S701.

Steps S725 to S726 are similar to steps S527 to S528 in FIG. 5B, andthus the description thereof is omitted. If the control unit 101 judgesin step S726 that the wireless network is a network formed by thedigital camera 100, the process proceeds to step S727. If the controlunit judges that the wireless network is not a network formed by thedigital camera 100, the process proceeds to step S729.

In step S727, the control unit 101 judges whether or not a networkparameter is generated in step S705. If the control unit 101 judges thata network parameter is generated, the process proceeds to step S728, andthe control unit 101 stores the network parameter. If the control unit101 judges that a network parameter is not generated, the processproceeds to step S729.

In step S728, the control unit 101 stores the parameter of the networkformed by the digital camera 100 in the network formation parametersection 430, and ends the second connection. For example, when thenetwork formation parameter section 430 is in the state illustrated inFIG. 4, in a case where “mobilePhone2” is selected in step S701, theESSID of the network formed by the digital camera 100 is “CAMERA-456”,and the encryption key is “11112222”, the ESSID “CAMERA-456” and theencryption key “11112222” are stored in the column 432 of the networkformation parameter number 2 in the network formation parameter section430.

In step S729, the control unit 101 updates the parameter of theconnected apparatus in the connected apparatus information section 410.For example, in a case where the connected apparatus information section410 is in the state illustrated in FIG. 4, if “mobilePhone2” is selectedin step S701, the control unit 101 stores a value “7”, which is largerthan the values of the connection order of other connected apparatusinformation, in the field of “connection order” in the column 412 of theconnected apparatus information number 2 in the connected apparatusinformation section 410. If the control unit 101 generates a networkparameter in step S727, the control unit 101 stores the networkformation parameter number in the column 412 of the connected apparatusinformation number 2 in the field of “network formation parameternumber” in the network formation parameter section 430 stored in stepS728. Accordingly, in a case where a network is formed for“mobilePhone2” next time to establish a connection, the same wirelessLAN parameter can be used.

With reference to FIG. 7C, a description will be given of a process ofestablishing a connection for the second time (changing a network)performed by the digital camera 100.

Referring to FIG. 7C, steps S731 to S733 are similar to steps S541 toS543 in FIG. 5C, and thus the description thereof is omitted. If thecontrol unit 101 judges in step S733 to participate in a wireless LANnetwork, the process proceeds to step S738. If the control unit 101judges not to participate in a wireless LAN network, the processproceeds to step S734.

Steps S734 to S737 are similar to steps S705 to S708, and thus thedescription thereof is omitted. After step S737, the process proceeds tostep S721.

Steps S738 to S745 are similar to steps S546 to S553 in FIG. 5C, andthus the description thereof is omitted. After step S743, the processproceeds to step S721. After step S744, the process proceeds to stepS721. After an error message is displayed in step S745, if anotification indicating that the error message has been read is receivedfrom the user of the digital camera 100, the process proceeds to stepS731.

As described above, the digital camera 100 according to this embodimentstarts a process of participating in an appropriate network afterdesignating an apparatus having a connection history. Afterparticipating in the network, the digital camera 100 establishes aconnection to the designated apparatus. From the viewpoint of the user,if the user selects an apparatus to be connected, a series of processesfor participating in a network and establishing a connection to theapparatus are appropriately performed, and thus operability can beenhanced.

Second Embodiment

Hereinafter, a process of the digital camera 100 according to a secondembodiment will be described.

In the above-described first embodiment, a description has been given ofan example in which two data communication modes are available betweenthe digital camera 100 and the mobile phone 200, and appropriate controlis performed in accordance with these data communication modes. However,depending on the hardware configuration, usage manner, and usageenvironment of an apparatus to be connected, it may be better to changea method for searching for an AP as necessary. As described above in thefirst embodiment, AP searching is performed by detecting, by theindividual apparatuses that participate in the same wireless LANnetwork, a beacon signal transmitted from the AP. However, it ispossible that a single search process is insufficient to find a desiredAP, depending on timing, signal strength, the number of wireless LANnetworks, or other factors.

The control unit 101 searches for an AP in step S502 in FIG. 5A.Subsequently, in step S503, the control unit 101 judges whether or not aregistered AP exists. However, even if the control unit 101 judges instep S503 that a registered AP is not found, the process may return tostep S502, and AP searching may be performed again. Note that, in asituation where a registered AP is not actually found, if AP searchingis performed again and again, the processing time becomes longeraccordingly. For this reason, an upper limit of the number of searchprocesses may be set, for example, if no APs are found by performingsearching three times, the process proceeds to steps S504 and S505 (awireless network formation process) without returning to step S502.Accordingly, even if a desired AP is not found through a single searchprocess due to the timing or signal strength of AP searching, the searchprocess is repeated up to the upper limit. Thus, a connection to adesired wireless LAN network can be established.

Furthermore, a flow of a process may be changed depending on an ambientnetwork environment. The possibility of existence of an AP that is notfound through a single search process is described above. However, it isoften the case that some APs are found but some APs are not found, andit is not often the case that an AP is not found though there are APsthat can be found in the surrounding area.

Thus, the control unit 101 searches for an AP in step S502, and, if anaccess point is not found, the process does not return to step S502 (asearch process), and may proceed to steps S504 and S505 (a wirelessnetwork formation process). Accordingly, under the environment in whichno access points exist around the digital camera 100, that is, under theenvironment in which no wireless LAN networks exist, the process canproceed to steps S504 and S505 (a wireless network formation process)without an unnecessary search process.

This is the same in the AP searching in step S541 in FIG. 5C. There isalso a possibility that a single search process is insufficient to findall APs. Thus, for example, if a search process is performed three timesand if a list of APs that are found is displayed in step S542, moreaccurate information can be provided to the user.

Depending on the usage purpose of the user, it may be better toappropriately change a connection sequence.

As described above in the first embodiment, a wireless LAN networkformed by the digital camera 100 according to this embodiment does nothave a communication function for an external network, such as theInternet. Thus, the mobile phone 200 that participates in the wirelessLAN network formed by the digital camera 100 is incapable oftransmitting data to the Internet or the like via a simplified AP. Thus,for a user whose main purpose is to connect to an external network suchas the Internet, it is not necessary to perform the wireless networkformation process in steps S504 and S505 in FIG. 5A. Also, in a casewhere there are no registered APs in step S501 and in a case where noregistered APs are found in step S503, the process does not proceed tosteps S504 and S505. In this case, the process proceeds to step S541 inFIG. 5C (branched from step S501) or step S542 (branched from stepS503).

In step S543, the user is capable of selecting participating in anunregistered wireless network or starting a wireless network formationprocess. Thus, a user whose main purpose is to connect to an externalnetwork such as the Internet is capable of participating in a wirelessnetwork of an unregistered AP without performing a wireless networkformation process. Also, the user may select a connection through awireless network formation process.

Note that the control unit 101 may judge whether the main purpose of auser is to connect to an external network such as the Internet byinquiring of the mobile phone 200, or may perform switching in responseto an input from the user of the digital camera 100.

Other Embodiments

Embodiments of the present invention can also be realized by a computerof a system or apparatus that reads out and executes computer executableinstructions recorded on a storage medium (e.g., non-transitorycomputer-readable storage medium) to perform the functions of one ormore of the above-described embodiments of the present invention, and bya method performed by the computer of the system or apparatus by, forexample, reading out and executing the computer executable instructionsfrom the storage medium to perform the functions of one or more of theabove-described embodiments. The computer may comprise one or more of acentral processing unit (CPU), micro processing unit (MPU), or othercircuitry, and may include a network of separate computers or separatecomputer processors. The computer executable instructions may beprovided to the computer, for example, from a network or the storagemedium. The storage medium may include, for example, one or more of ahard disk, a random-access memory (RAM), a read only memory (ROM), astorage of distributed computing systems, an optical disk (such as acompact disc (CD), digital versatile disc (DVD), or Blu-ray Disc (BD)™),a flash memory device, a memory card, and the like.

While the present invention has been described with reference toexemplary embodiments, it is to be understood that the invention is notlimited to the disclosed exemplary embodiments. The scope of thefollowing claims is to be accorded the broadest interpretation so as toencompass all such modifications and equivalent structures andfunctions.

This application claims the benefit of Japanese Patent Application No.2012-286677, filed Dec. 28, 2012, which is hereby incorporated byreference herein in its entirety.

What is claimed is:
 1. A communication apparatus that is to be connectedto an external apparatus via a network, comprising: a participation unitconfigured to participate in a network formed by an external accesspoint; a forming unit configured to form a network, with thecommunication apparatus as an access point; a holding unit configured tohold information on one or more networks in which the communicationapparatus has participated before, information on one or more externalapparatuses to which the communication apparatus has been connectedbefore, information on a first network previously formed by the formingunit, and information on a second network previously formed by theexternal access point such that the information on the first network andthe information on the second network are identifiable; an acceptingunit configured to accept selection, on the basis of the information onthe one or more external apparatuses held by the holding unit, of anexternal apparatus for which communication via a network is to beestablished; a judging unit configured to judge, in a case whereselection is accepted by the accepting unit, whether or not a networkcorresponding to the information on the second network held by theholding unit exists; and a determining unit configured to, in a casewhere the judging unit judges that the network does not exist, determineto use a network based on the information on the first network held bythe holding unit.
 2. The communication apparatus according to claim 1,further comprising: a searching unit configured to search for, in a casewhere selection is accepted by the accepting unit, a network in an areasurrounding the communication apparatus, wherein the judging unitcompares information on the network that is searched for by thesearching unit with the information on the second network held by theholding unit.
 3. The communication apparatus according to claim 2,wherein, in a case where the information on the second network is notheld by the holding unit when selection is accepted by the acceptingunit, the searching unit does not search for a network in the areasurrounding the communication apparatus.
 4. The communication apparatusaccording to claim 1, wherein the participation unit preferentiallyparticipates in a network in which the participation unit hasparticipated most recently among networks that are judged to exist bythe judging unit.
 5. The communication apparatus according to claim 1,further comprising: a display unit configured to display an operationscreen that is used for establishing a connection via the network formedby the external access point, in a case where the information on thesecond network is not held by the holding unit when selection is notaccepted by the accepting unit.
 6. The communication apparatus accordingto claim 1, wherein the forming unit newly forms a network in a casewhere the holding unit does not hold either the information on the firstnetwork or the information on the second network.
 7. The communicationapparatus according to claim 1, wherein the communication apparatus isan image capturing apparatus.
 8. The communication apparatus accordingto claim 1, wherein the communication apparatus is a mobile phone. 9.The communication apparatus according to claim 1, wherein thecommunication apparatus is a tablet device.
 10. A method for controllinga communication apparatus that is to be connected to an externalapparatus via a network, comprising: participating in a network formedby an external access point; forming a network, with the communicationapparatus as an access point; holding information on one or morenetworks in which the communication apparatus has participated before,information on one or more external apparatuses to which thecommunication apparatus has been connected before, information on afirst network formed in the forming step, and information on a secondnetwork, formed by the external access point, and participated in by thecommunication apparatus in the participating step, such that theinformation on the first network and the information on the secondnetwork are identifiable; accepting selection, on the basis of the heldinformation on the one or more external apparatuses, of an externalapparatus for which communication via a network is to be established;judging, in a case where selection is accepted, whether or not a networkcorresponding to the held information on the second network exists; andin a case where the judging judges that the network corresponding to theheld information on the second network does not exist, determining touse a network based on the held information on the first network.
 11. Acomputer-readable recording medium storing a program that causes acomputer to function as the communication apparatus of claim 1.